package com.ct.utils.validator.utils;

import com.ct.utils.exception.ValidationException;
import com.ct.utils.result.IResultCode;
import com.ct.utils.validator.enums.ValidatorEnum;

public class VAssert {


    public static void isEmpty(String content, IResultCode resultCode){
        if(null == content || "".equals(content)){
            throw new ValidationException(resultCode);
        }
    }

    public static void isEmail(String email){
        if(!ValidatorUtil.isEmail(email)){
            throw new ValidationException(ValidatorEnum.EMAIL_PARAMATER_ERROR);
        }
    }
}
